﻿using Appliaction.Dto.DB;
using Domain.Entitys.DB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.DB
{
    /// <summary>
    /// Appliaction库区服务
    /// </summary>
    public interface IDb_warehouse_zoneServices
    {
        /// <summary>
        ///库区分页查询
        /// </summary>
        /// <param name="warehouse_name">名称</param>
        /// <param name="currentPage">当前页</param>
        /// <param name="pageSize">查询条数</param>
        /// <returns></returns>
        List<Warehouse_zone> Select_fy_warehouse_zone(string warehouse_code, string zone_name, int currentPage, int pageSize);

        /// <summary>
        /// 查询总条数
        /// </summary>
        /// <param name="warehouse_name"></param>
        /// <returns></returns>
        int Select_count_warehouse_zone(string warehouse_code, string zone_name);

        /// <summary>
        /// 仓库库区修改冻结状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="Warehouse_freeze"></param>
        /// <returns></returns>
        Task<int> warehouse__zone_Frozenstate(int id, char zone_freeze);

        /// <summary>
        /// 仓库库区编码唯一性判断
        /// </summary>
        /// <param name="zone_code"></param>
        /// <param name="warehouse_code"></param>
        /// <returns></returns>
        Task<int> Warehousezone_code_judgment(string zone_code, string warehouse_code);

        /// <summary>
        /// 仓库库区名称唯一性判断
        /// </summary>
        /// <param name="zone_name"></param>
        /// <param name="warehouse_code"></param>
        Task<int> Warehousezone_name_judgment(string zone_name, string warehouse_code);

        /// <summary>
        /// 添加仓库库区
        /// </summary>
        /// <param name="db_WarhousezoneAddDto"></param>
        /// <returns></returns>
        Task<int> Warehousezone_Add(Db_warhousezoneAddDto db_WarhousezoneAddDto);

        /// <summary>
        /// 仓库库区点击允许产品混放
        /// </summary>
        /// <param name="warehouse_zone"></param>
        /// <returns></returns>
        Task<int> Warehousezone_ProductMix(Db_Warehouse_zone_UpdateDto db_Warehouse_zone_UpdateDto);
        /// <summary>
        /// 仓库库区点击不允许产品混放
        /// </summary>
        /// <param name="id"></param>
        /// <param name="zone_mixing"></param>
        /// <returns></returns>
        Task<int> Warehousezone_ProductMixNO(Db_Warehouse_zone_UpdateDto db_Warehouse_zone_UpdateDto);

        /// <summary>
        /// 仓库库区点击允许批次混放
        /// </summary>
        /// <param name="id"></param>
        /// <param name="zone_batch_mixing"></param>
        /// <returns></returns>
        Task<int> Warehousezone_BatchMix(Db_Warehouse_zone_UpdateDto db_Warehouse_zone_UpdateDto);

        /// <summary>
        /// 点击仓库库区冻结状态

        /// </summary>
        /// <param name="id"></param>
        /// <param name="zone_batch_mixing"></param>
        /// <returns></returns>
        Task<int> Warehousezone_BatchMixNO(Db_Warehouse_zone_UpdateDto db_Warehouse_zone_UpdateDto);

        /// <summary>
        /// 判断仓库库区添加的容量是否超过仓库容量
        /// </summary>
        /// <param name="warehouse_code"></param>
        /// <param name="zone_capacity"></param>
        /// <returns></returns>
        Task<int> Warehousezone_Capacity_judgment(string warehouse_code, int zone_capacity);
        /// <summary>
        /// 修改仓库库区信息
        /// </summary>
        /// <param name="db_Warehouse_ZoneUpdatexgDto"></param>
        /// <returns></returns>
        Task<int> Warehousezone_Update(Db_warehouse_ZoneUpdatexgDto db_Warehouse_ZoneUpdatexgDto);

        /// <summary>
        /// 逻辑删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> warehouse_zone_tombstone(string warehouse_code, string zone_code);



        /// <summary>
        /// 查询库区
        /// </summary>
        /// <param name="warehouse_code"></param>
        /// <returns></returns>
        List<Warehouse_zone> warehouse_zone_Async(string warehouse_code);

        /// <summary>
        /// 结构编码查询仓库信息
        /// </summary>
        /// <param name="warehouse_code"></param>
        /// <returns></returns>
        List<Warehouse_zone> Warehouse_zone_By_Select_Async_code(string warehouse_code, string zone_code);



        /// <summary>
        /// 判断仓库库区修改的容量是否超过仓库容量
        /// </summary>
        /// <param name="warehouse_code"></param>
        /// <param name="zone_capacity"></param>
        /// <returns></returns>
        Task<int> Warehousezone_Capacity_judgment_update(string warehouse_code, string zone_code, int new_zone_capacity);


        /// <summary>
        /// 修改名称判断
        /// </summary>
        /// <param name="zone_name"></param>
        /// <param name="warehouse_code"></param>
        /// <param name="zone_code"></param>
        /// <returns></returns>
        Task<int> Warehousezone_name_UpdateJudgment(string zone_name, string warehouse_code, string zone_code);
    }
}
